home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / stckdmpr.sit / Stack Dumper 3.0 / stack_-1.xml < prev    next >
Extensible Markup Language  |  1991-03-13  |  4KB  |  20 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.0</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>2930</cardID>
  8.     <listID>3659</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>224</height>
  15.     </cardSize>
  16.     <script>on openStackget the versionif it < 2.0 thenanswer "This Stack needs HyperCard 2.0 or later."&┬¼"(You are using Version"&&it&")."go backexit openStackend if-- locate this stack's window so that the target stack isn't obscuredget screenRect()put item 3 of it - item 1 of it into screenwidthput item 4 of it - item 2 of it into screenheightset left of card window to max(0,screenwidth/2-width of card window)set top of card window to max(40,screenheight/2-height of card window)-- hide mbar if it's obscuring the card:if top of card window < 20 then hide menuBar-- show tool window, moving card if necessary (and possible)set left of tool window to max(-(width of tool window+3), ┬¼-left of card window)-- ie adjacent to card window--show tool window-- move msg box if it's obscuring the card:if top of msg window < height of card window and bottom of ┬¼card window + height of msg window < item 4 of screenRect() thenset top of msg to height of card window+13end ifset left of msg to 0 -- ie aligned with card windowpass openStackend openStackon closeStackput empty into bg field "Bg Names"put empty into bg field "Output files"end closeStackFunction plural n, stringif n Γëá 1 then put "s" after stringreturn n && stringend pluralon toComputerset cursor to busyset lockscreen to trueset lockmessages to trueset lockrecent to trueend toComputeron toUserset lockscreen to falseset lockmessages to falseset lockrecent to falseset cursor to normalend toUseron WriteScript stringWriteText stringend WriteScripton WriteText string-- using XFCN version of of writetextwritestr gettext(string)end WriteTexton writestr stringglobal SDFileoutwrite string to file SDFileoutend writestron mouseUpif short name of the target contains "*Help*" thensend mouseUp to bg btn "doHelp"end ifpass mouseUpend mouseUpon closeCardif there is a  bg btn "doHelp" thenif hilite of bg btn "doHelp" then send mouseUp to bg btn "doHelp"end ifpass closeCardend closeCardon doHelp -- invoked by the dohelp ("?") buttonif hilite of the target is false thenset hilite of the target to trueShowHide "show"elseset hilite of the target to falselock screenShowHide "hide"end ifunlock screenend doHelpon ShowHide action, layerlock screenif layer = 1 then send "mouseUp" to bg btn "dohelp"repeat with i = 1 to number of card fieldsget short name of cd fld iif it contains "*Help*" and┬¼(layer is empty or last word of it >= layer) thendo action && "cd fld" && iend ifend repeatrepeat with i = 1 to number of bg buttonsget short name of bg btn iif it contains "*Help*" and┬¼(layer is empty or last word of it >= layer) thenif action = "hide" and hilite of bg btn i thensend "mouseUp" to bg btn iend ifdo action && "bg btn" && iend ifend repeat--if layer is empty or layer = 1 then do action && "card picture"unlock screenend ShowHideon doUnlock -- invoked by the "unlock help" buttonif the hilite of the Target is false then lockflds falseelse lockflds trueset the hilite of the Target to not the hilite of the Targetend doUnlockon lockflds NewStaterepeat with i = 1 to number of card fieldsset the locktext of cd fld i to NewStateend repeatend lockfldsfunction lastSegment delimiter, str-- return the portion of str that follows the last occurence of-- delimiter in str (return empty if delimiter doesn't occur)put length(delimiter) into nget offset(delimiter, str)if it = 0 then return emptyrepeat until it = 0put char it+n to length(str) of str into strget offset(delimiter, str)end repeatreturn strend lastSegment</script>
  17.     <background id="2744" file="background_2744.xml" name="Stack Dumper" />
  18.     <card id="2930" file="card_2930.xml" marked="false" name="" owner="2744" />
  19. </stack>
  20.